import request from './../utils/request.js';

/**
 * 公共接口
 *
 */
export function getUserInfo(data) {
  return request.get('member/detail', data || {});
}

export function getUserProfile(data) {
  return request.get('member/profile', data || {});
}

export function getUserQuickProfile(data) {
  return request.get('member/quick_profile', data || {});
}

// 获取区域
export function getEditData(type) {
  return request.get('member/get_edit_data', {type: type});
}

export function updateMember(data) {
  return request.post('member/update', data || {});
}

// 编辑单个字段
export function updateMemberField(data) {
  return request.post('member/update_field', data || {});
}

// 获取区域
export function getAreas(data) {
  return request.get('member/areas', data);
}


/**
 *排行-统计
 */
export function getStat(data) {
  return request.get('member/stat', data || {});
}

/**
 * 我的统计
 */
export function getMyStat(data) {
  return request.get('member/my_stat', data || {});
}
/**
 * 积分统计
 */
export function getIntegralRecord(data) {
  return request.get('member/integral_record', data || {});
}